const isLocal = window.isLocalEnv;

// 常用的本地配置
let config = {
  title: 'Common X Multiple Y',
  componentStyle: window._adoPremise.uc.theme,
  color: window._adoPremise.uc.theme === 'dark' ? 'A1' : 'D1',
  xAxisName: '',
};
if (isLocal) {
  config = {
    title: '标题',
    componentStyle: 'dark',
    color: 'D1',
    xAxisName: '日期',
  };
}
import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';
export default {
  isCustomProertyPannel: true,
  propertyPannelName: 'config_visual_common_x_multiple_y',
  componentName: 'common_x_multiple_y',
  config: {
    property: {
      title: '',
      xAxisName: '',
      barShow: false,
      barNum: 6,
      xLabelRotate: 0,
      chartPadding: 30,
      yAxisNameLeft: 60,
      componentStyle: config.componentStyle,
      data: [
        {
          id: 'id_1599642116163',
          yAxisId: 'y1',
          yAxisName: '',
          chartType: 'uniaxial-bar',
          option: {
            barWidth: 10,
            arrangement: 'parallel', // parallel stack
            legend: true,
            color: window._adoPremise.uc.theme === 'dark' ? 'A9' : 'D4',
            isMarklineShow: true,
            hasMarkLine: false,
            markLine: [
              {
                value: '',
                color: '#FF0000',
              },
            ],
          },
        },
      ],
      tooltip: {
        isVisiable: false,
        vars: {},
        html: '',
        apis: [],
      },
    },
    data: {
      apis: [
        {
          dataSourceType: '',
          dataSource: '',
          dataTable: '',
          redisKey: '',
          apiCode: '',
          dataPackage: '',
          apiName: '',
          apiId: '',
        },
      ],
      datas: [
        [
          {
            id: 'id_1599642116163',
            field: 'api',
            apiCode: '',
            mapping: '',
            explain: 'api',
          },
          {
            id: 'id_1599642116163',
            field: 'x',
            apiCode: '',
            mapping: '',
            explain: 'panelData.explain.horizontalAxis',
            type: '',
          },
          {
            id: 'id_1599642116163',
            field: 'y1',
            apiCode: '',
            mapping: '',
            explain: 'panelData.explain.value',
            type: '',
          },
          {
            id: 'id_1599642116163',
            field: 's',
            apiCode: '',
            mapping: '',
            explain: 'word.category',
            skipVerification: true,
          },
        ],
      ],
    },
    linkage: {},
  },
  events: [
    {
      id: 'c85c5869-7162-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-0987-4882-b77b-782wsdfac7db',
          key: 'key-old-1',
          label: '区域',
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-kjhh-8566-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-poik-2589-b77b-782wsdfac7db',
          key: 'key-old-2',
          label: '时间',
          value: '',
        },
      ],
    },

    {
      id: '0000001-7162-bnmj-9b7a-1b7f04c85999',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-grvs-b77b-782tgbfac999',
          key: 'key-1',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000002-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8f42b8f0-d315-11ea-988b-c71201010d36',
          key: 'key-2',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000003-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4cf9440-d315-11ea-bf46-2557ecf0db55',
          key: 'key-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000004-d315-11ea-bf46-2557ecf0db55',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4d141f1-d315-11ea-bf46-2557ecf0db55',
          key: 'key-4',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000005-1000-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1000-4882-b77b-782wsdfac7db',
          key: 'key-5',
          label: '',
          value: '',
        },
      ],
    },

    {
      id: '0000006-1010-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1010-4882-b77b-782wsdfac7db',
          key: 'key-6',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000007-1002-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1002-4882-b77b-782wsdfac7db',
          key: 'key-7',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000008-1003-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1003-4882-b77b-782wsdfac7db',
          key: 'key-8',
          label: '',
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};
